package com.april.controller;

import com.april.pojo.TbItemCat;
import com.april.service.ItemCategoryService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: 槐序 廿一
 * @Date: 2023-06-19
 * @Time: 19:56
 * @Description:
 */
@RestController
@RequestMapping("itemCategory")
public class ItemCategoryServiceController {

    @Resource
    ItemCategoryService itemCategoryService;

    @RequestMapping("provider/selectItemCategoryByParentId")
    List<TbItemCat> selectItemCategoryByParentId(@RequestParam(value = "id", required = false, defaultValue = "0") Long id) {
        return itemCategoryService.selectItemCategoryByParentId(id);
    }
}
